package com.xiaow.springsecuriydemo.service.impl;

import com.xiaow.springsecuriydemo.entity.Goods;
import com.xiaow.springsecuriydemo.mapper.GoodsMapper;
import com.xiaow.springsecuriydemo.service.GoodsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xiaow.springsecuriydemo.vo.GoodVo;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xiaow
 * @since 2022-09-17
 */
@Service
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements GoodsService {

    @Override
    public List<GoodVo> getAllGoods(Integer state) {
        List<GoodVo> allGoods = baseMapper.getAllGoods(state);
        return allGoods;
    }

    @Override
    public GoodVo getOneById(Integer id) {
        return baseMapper.getOneById(id);
    }
}
